﻿/*----------------------------------------------------------------
//  <copyright file="DingTalkOptions.cs" company="MicroCloud@151504200868">
//      Copyright © 2020-2024 MicroCloud Corporation, All rights reserved.
//  </copyright>
//  <site>https://gitee.com/chenmm123/microclouds</site>
//  <last-editor>cmm</last-editor>
//  <last-date>2023-12-06 08:33</last-date>
//----------------------------------------------------------------*/

namespace MicroCloud.Authentication.OAuth2.DingTalk
{
    #region "钉钉身份认证选项"
    /// <summary>
    /// 钉钉身份认证选项
    /// </summary>
    public class DingTalkOptions : OAuthOptions
    {
        #region "属性"
        #region "获取或设置 钉钉 AppId"
        /// <summary>
        /// 获取或设置 钉钉 AppId 
        /// </summary>
        public string AppId
        {
            get { return ClientId; }
            set { ClientId = value; }
        }
        #endregion
        #region "获取或设置 钉钉 AppKey"
        /// <summary>
        /// 获取或设置 钉钉 AppKey
        /// </summary>
        public string AppKey
        {
            get { return ClientSecret; }
            set { ClientSecret = value; }
        }
        #endregion

        #endregion

        #region "构造函数"
        #region "初始化一个钉钉身份认证选项的新实例"
        /// <summary>
        /// 初始化一个钉钉身份认证选项 <see cref="DingTalkOptions"/> 的新实例
        /// </summary>
        public DingTalkOptions()
        {

            ClaimsIssuer = DingTalkDefaults.Issuer;
            CallbackPath = new PathString(DingTalkDefaults.CallbackPath);

            AuthorizationEndpoint = DingTalkDefaults.AuthorizationEndpoint;
            TokenEndpoint = DingTalkDefaults.TokenEndpoint;
            UserInformationEndpoint = DingTalkDefaults.UserInformationEndpoint;

            //StateDataFormat = 
            //Scope 表示用户授权时向用户显示的可进行授权的列表。
            Scope.Add(DingTalkDefaults.snsapi_login); 

        }
        #endregion

        #endregion

    }
    #endregion

}
